@layout("/common/_container.html",{js:["/assets/customPage_files/jquery.min.js"]}){

<div class="layui-body-header">
    <span class="layui-body-header-title">自定义装修页面管理</span>
</div>
<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-sm12 layui-col-md12 layui-col-lg12">
            <blockquote class="layui-elem-quote">
                小程序页面路径
            </blockquote>
            <div class="layui-card">
                <div class="layui-card-body">
                    <ul>
                        <li>
                            <div class="link-title">
                                <div>首页</div>
                                <div>地址:&nbsp;&nbsp;<span>/pages/index/index</span>
                                    <input id="url_1" style="display: none" id="url" value="/pages/index/index"/>
                                    <button type="button" class="layui-btn layui-btn-xs icon-btn layui-btn-normal" onclick="copyUrl(this)">复制</button>
                                </div>
                            </div>
                            <div class="dash-line"></div>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
    </div>
</div>
<script>
    function copyUrl(obj) {
        let id = $(obj).prev().attr("id");
        $(obj).prev().show();
        let url = document.querySelector("#" + id)
        url.select();
        document.execCommand("Copy");
        $("#" + id).hide();
        layer.msg('复制成功', {icon: 1});
    }
</script>
<style>
    li {
        padding: 6px 18px;
        border-bottom: #eee dashed 1px;
    }

    .link-title > div:nth-child(1) {
        color: #00a2d4;
        font-size: 18px
    }

    .link-title > div:nth-child(2) {
        margin-top: 5px
    }

    .link-title > div:nth-child(2) > span {
        color: green;
    }
</style>
@}